3.359 \(\int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx\)

Optimal. Leaf size=236 \[ -\text{Unintegrable}\left ((a+b \sec (c+d x))^n,x\right )+\frac{\sqrt{2} (a+b) \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac{a+b \sec (c+d x)}{a+b}\right )^{-n} F_1\left (\frac{1}{2};\frac{1}{2},-n-1;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x)),\frac{b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt{\sec (c+d x)+1}}-\frac{\sqrt{2} a \tan (c+d x) (a+b \sec (c+d x))^n \left (\frac{a+b \sec (c+d x)}{a+b}\right )^{-n} F_1\left (\frac{1}{2};\frac{1}{2},-n;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x)),\frac{b (1-\sec (c+d x))}{a+b}\right )}{b d \sqrt{\sec (c+d x)+1}} \]

[Out]

(Sqrt[2]*(a + b)*AppellF1[1/2, 1/2, -1 - n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*
Sec[c + d*x])^n*Tan[c + d*x])/(b*d*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^n) - (Sqrt[2]*a*Appel
lF1[1/2, 1/2, -n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*Sec[c + d*x])^n*Tan[c + d*
x])/(b*d*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^n) - Unintegrable[(a + b*Sec[c + d*x])^n, x]

________________________________________________________________________________________

Rubi [A]  time = 0.329608, antiderivative size = 0, normalized size of antiderivative = 0., number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx \]

Verification is Not applicable to the result.

[In]

Int[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^2,x]

[Out]

(Sqrt[2]*(a + b)*AppellF1[1/2, 1/2, -1 - n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*
Sec[c + d*x])^n*Tan[c + d*x])/(b*d*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^n) - (Sqrt[2]*a*Appel
lF1[1/2, 1/2, -n, 3/2, (1 - Sec[c + d*x])/2, (b*(1 - Sec[c + d*x]))/(a + b)]*(a + b*Sec[c + d*x])^n*Tan[c + d*
x])/(b*d*Sqrt[1 + Sec[c + d*x]]*((a + b*Sec[c + d*x])/(a + b))^n) - Defer[Int][(a + b*Sec[c + d*x])^n, x]

Rubi steps

\begin{align*} \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx &=\int (a+b \sec (c+d x))^n \left (-1+\sec ^2(c+d x)\right ) \, dx\\ &=\frac{\int (-b-a \sec (c+d x)) (a+b \sec (c+d x))^n \, dx}{b}+\frac{\int \sec (c+d x) (a+b \sec (c+d x))^{1+n} \, dx}{b}\\ &=-\frac{a \int \sec (c+d x) (a+b \sec (c+d x))^n \, dx}{b}-\frac{\tan (c+d x) \operatorname{Subst}\left (\int \frac{(a+b x)^{1+n}}{\sqrt{1-x} \sqrt{1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt{1-\sec (c+d x)} \sqrt{1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ &=\frac{(a \tan (c+d x)) \operatorname{Subst}\left (\int \frac{(a+b x)^n}{\sqrt{1-x} \sqrt{1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt{1-\sec (c+d x)} \sqrt{1+\sec (c+d x)}}+\frac{\left ((-a-b) (a+b \sec (c+d x))^n \left (-\frac{a+b \sec (c+d x)}{-a-b}\right )^{-n} \tan (c+d x)\right ) \operatorname{Subst}\left (\int \frac{\left (-\frac{a}{-a-b}-\frac{b x}{-a-b}\right )^{1+n}}{\sqrt{1-x} \sqrt{1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt{1-\sec (c+d x)} \sqrt{1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ &=\frac{\sqrt{2} (a+b) F_1\left (\frac{1}{2};\frac{1}{2},-1-n;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x)),\frac{b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac{a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt{1+\sec (c+d x)}}+\frac{\left (a (a+b \sec (c+d x))^n \left (-\frac{a+b \sec (c+d x)}{-a-b}\right )^{-n} \tan (c+d x)\right ) \operatorname{Subst}\left (\int \frac{\left (-\frac{a}{-a-b}-\frac{b x}{-a-b}\right )^n}{\sqrt{1-x} \sqrt{1+x}} \, dx,x,\sec (c+d x)\right )}{b d \sqrt{1-\sec (c+d x)} \sqrt{1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ &=\frac{\sqrt{2} (a+b) F_1\left (\frac{1}{2};\frac{1}{2},-1-n;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x)),\frac{b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac{a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt{1+\sec (c+d x)}}-\frac{\sqrt{2} a F_1\left (\frac{1}{2};\frac{1}{2},-n;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x)),\frac{b (1-\sec (c+d x))}{a+b}\right ) (a+b \sec (c+d x))^n \left (\frac{a+b \sec (c+d x)}{a+b}\right )^{-n} \tan (c+d x)}{b d \sqrt{1+\sec (c+d x)}}-\int (a+b \sec (c+d x))^n \, dx\\ \end{align*}

Mathematica [A]  time = 3.3591, size = 0, normalized size = 0. \[ \int (a+b \sec (c+d x))^n \tan ^2(c+d x) \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^2,x]

[Out]

Integrate[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^2, x]

________________________________________________________________________________________

Maple [A]  time = 0.263, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\sec \left ( dx+c \right ) \right ) ^{n} \left ( \tan \left ( dx+c \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x)

[Out]

int((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x)

________________________________________________________________________________________

Maxima [A]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*tan(d*x + c)^2, x)

________________________________________________________________________________________

Fricas [A]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x, algorithm="fricas")

[Out]

integral((b*sec(d*x + c) + a)^n*tan(d*x + c)^2, x)

________________________________________________________________________________________

Sympy [A]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right )^{n} \tan ^{2}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))**n*tan(d*x+c)**2,x)

[Out]

Integral((a + b*sec(c + d*x))**n*tan(c + d*x)**2, x)

________________________________________________________________________________________

Giac [A]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^2,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^n*tan(d*x + c)^2, x)